home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2685 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.1 KB

  1. Path: news.mindlink.net!news
  2. From: brent_bysouth@mindlink.bc.ca (Brent Bysouth)
  3. Newsgroups: comp.lang.c++,comp.lang.pascal.delphi.misc
  4. Subject: Re: C++ with Zapp vs. Delphi
  5. Date: Fri, 19 Jan 1996 03:10:52 GMT
  6. Organization: MIND LINK! - British Columbia, Canada
  7. Message-ID: <4dn2qj$o7s@fountain.mindlink.net>
  8. References: <4coar6$d4n@sun4.bham.ac.uk> <4coip7$69s@news1.usa.pipeline.com> <fRA+w0JfFG5X089yn@oslonett.no> <4dcc4d$6anc@tigger.cc.uic.edu> <4ddke3$5lf@fountain.mindlink.net> <4dfivq$34fs@tigger.cc.uic.edu>
  9. NNTP-Posting-Host: line085.nwm.mindlink.net
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. olczyk@sunphy1 (Thadeus Olczyk) wrote:
  13.  
  14. >Brent Bysouth (brent_bysouth@mindlink.bc.ca) wrote:
  15. >: You don't seem to understand the significance of RTTI in Delphi.  You
  16. >As far as I understand RTTI in Delphi,  it is a slightly weaker version
  17. >of the C++ version. If so then it considered bad practice -- violating 
  18. >the open/close principle. If not then Borland had better clean up their 
  19. >documentation because I have never seen any mention of it. 
  20.  
  21.  
  22. Well, you don't access the RTTI directly (if that's what you think I
  23. mean).  You use accessor functions (like SetProp, GetProp, &
  24. MethodAddress -- there's a couple more as well).  Also note that you
  25. can use the message directive (or MethodAddress) to name-lookup
  26. methods...
  27.  
  28. ObjC and Smalltalk are definitely cleaner wrt their support for
  29. dynamic method resolution, but the facilities for it are there in
  30. Object Pascal.  Borland has not directed attention to it that much
  31. with Delphi, but they have used it with event properties and use it
  32. for handling Windows messages -- no message map macros needed here,
  33. folks.
  34.  
  35. BTW, Delphi 2.0 (out next month) apparently supports a
  36. dynamically-typed 'type'!  It was primarily added to ease using OLE
  37. "objects" (ie. with Automation), but its addition will be welcome.
  38.  
  39. Oh, and I was going to comment on your particular example of MI, but
  40. it seems like others have already expressed my views better than I
  41. could... ;-)
  42.  
  43.  
  44. --------------------------------------------------
  45. brent_bysouth@mindlink.bc.ca
  46. VB, Delphi & SQL Development
  47. Vancouver, BC.
  48. (604) 689-2616
  49. -------------------------------------------------
  50.  
  51.